<?php
require_once('auth/autenticar.php');
require_once('conectar.php');
if (isset($_SESSION['SESS_MEMBER_ID'])){
	$idresto=(isset($_POST['idresto']))?mysql_real_escape_string($_POST['idresto']):0;
	$result = mysql_query("SELECT id FROM membersXrestaurants WHERE idrestaurant=$idresto AND member_id=".$_SESSION['SESS_MEMBER_ID']);
	if ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
		$_SESSION['Restaurant_ID'] = $idresto;
		echo '1';
	}else{ 
		echo 'No tiene los permisos necesarios';
	}
}else{
	echo 'Error';
}
?>
